import requests
from api.global_conf import BASEURL, LOGPATH, CSVPATH
from utils.index import Logs
log = Logs(LOGPATH)

def register(json):
    try:
        res = requests.post(BASEURL+'/api/account/register', json=json)
    except Exception as result:
        log.err(f'注册接口访问失败: /api/account/register \n报错信息: {result}')
    else:
        log.info(f'注册接口访问成功: /api/account/register \n返回数据: {res.text}')
        return res